<template>
  <a-menu
      v-model:selectedKeys="selectedKeys"
      style="width: 256px"
      mode="inline"
      :open-keys="openKeys"
      @openChange="onOpenChange"
  >
    <b v-for="Parent in NavData">
      <a-sub-menu v-if="Parent.FatherId==1" :key="Parent.Id">
        <template #icon>
          <MailOutlined/>
        </template>
        <template #title> {{ Parent.Title }}</template>
        <b v-bind="child in NavData">
          <a-menu-item v-if="child.FatherId === Parent.Id">
            {{ child.Title }}
          </a-menu-item
          >
        </b>
      </a-sub-menu>
    </b>
  </a-menu>
</template>

<script setup>
////////////////////////////////////////////
import {reactive, ref} from "vue";
import {post, setLocalToken} from "@/common";
import {useRouter} from "vue-router";
import {get} from "@/common";
import {message} from "ant-design-vue";
//import {DownloadOutlined} from "";
////////////////////////////////////////////
const show = ref(false);

const showTrans = () => {
  if (show.value == true) {
    show.value = false;
  } else {
    show.value = true;
  }
};

const NavData = ref([
  {
    Id: "100",
    Icons: "MailOutlined",
    Title: "操作",
    Path: "",
    FatherId: "1",
  },
  {
    Id: "200",
    Icons: "MailOutlined",
    Title: "吃饭",
    Path: "",
    FatherId: "1",
  },
  {
    Id: "101",
    Icons: "dashboard",
    Title: "操作01",
    Path: "",
    FatherId: "100",
  },
  {
    Id: "102",
    Icons: "dashboard",
    Title: "操作02",
    Path: "",
    FatherId: "200",
  },
  {
    Id: "103",
    Icons: "dashboard",
    Title: "操作03",
    Path: "",
    FatherId: "200",
  },
]);

</script>

<style>
</style>